package com.guage.producter.service.impl;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.guage.producter.domain.RetailHoldBook;
import com.guage.producter.mapper.RetailHoldBookMapper;
import com.guage.producter.service.RetailHoldBookService;

@Service
public class RetailHoldBookServiceImpl implements RetailHoldBookService {

	RetailHoldBookMapper retailHoldBookMapper;

	@Autowired
	public void setRetailHoldBookMapper(RetailHoldBookMapper retailHoldBookMapper) {
		this.retailHoldBookMapper = retailHoldBookMapper;
	}

	@Override
	public int insert(RetailHoldBook RetailHoldBook) throws ParseException {
		int insert = retailHoldBookMapper.insert(RetailHoldBook);
		return insert;
	}

	@Override
	public int insertSelective(RetailHoldBook record) {
		return retailHoldBookMapper.insertSelective(record);
	}

	@Override
	public int deleteByPrimaryKey(String holdId) {
		return retailHoldBookMapper.deleteByPrimaryKey(holdId);
	}

	@Override
	public int updatByPrimaryKeySelective(RetailHoldBook retailHoldBook) {
		return retailHoldBookMapper.updateByPrimaryKeySelective(retailHoldBook);
	}

	@Override
	public int updateBatchByPrimaryKeySelective(List<RetailHoldBook> list) {
		for(RetailHoldBook retailHoldBook : list) {
			retailHoldBookMapper.updateByPrimaryKeySelective(retailHoldBook);
		}
		return 0;
	}

	@Override
	public void dynamicDeleteRetailHoldBook(Map<String, Object> map) {
		retailHoldBookMapper.dynamicDeleteRetailHoldBook(map);
	}
}
